<template>
  <div class="sub-counter">
    <button @click="btnClick(1)">+1</button>
    <button @click="btnClick(5)">+5</button>
    <button @click="btnClick(10)">+10</button>
  </div>
</template>

<script setup>
  import { defineEmits } from "vue";

  const emit = defineEmits(["add"]);

  const btnClick = (num) => {
    emit("add", num);
  };
</script>

<style lang="scss" scoped></style>
